package com.baizhi.dao;

import com.baizhi.entity.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;
import java.util.stream.Stream;

public interface AdminDao {
    Admin selectByUserName(String userName);
    List<Admin> selectAllAdmin(@Param("offset") int offset, @Param("limit") int limit);
    int selectAdmin();
    int insertAdmin(Admin admin);
    int updataAdmin(Admin admin);
    Admin selectById(int id);
    int deleteAdmin(int id);

    //根据用户名，查询该用户具有的角色
    Set<String> selectRole(@Param("userName") String userName);
    //根据用户名 查询该用户具有的所有权限
    Set<String> selectResource(@Param("userName")String userName);

}
